package net.wangit.dev.settings;

import java.util.HashMap;
import java.util.Map;

import net.wangit.MapList;
import net.wangit.Path;
import net.wangit.support.MapListFactory;
import net.wangit.util.FileUtil;
/**
 *  取得皮肤即样式列表
 * @author watson
 *
 */
public class SkinMapListFactory implements MapListFactory {

	@Override
	public MapList getMapList() {
		String[] dirs = FileUtil.listDirectorys(Path.getRootPath()+"/common/skins/");
		MapList list = new MapList();
		Map<String, String> map = null;
		for(String dir:dirs){
			map = new HashMap<String, String>();
			map.put("name", dir);
			map.put("value", dir);
			list.insertRow(0, map);
		}
		return list;
	}

}
